{% extends 'mote.html' %}
{% block asset %}
     <div class="table-responsive">
            <a href="{% url 'asset_add' %}"><button class=" btn btn-info">添加</button></a>
<table class="table table-bordered table-striped">
    <thead>
    <tr class="info">
        <th>id</th>
        <th>物资名称</th>
        <th>物资描述</th>
        <th>编号</th>
        <th>购买时间</th>
        <th>所属实验室</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>

    {% for foo in asset_all %}
        <tr>
            <td>{{ forloop.counter }}</td>
            <td>{{ foo.name }}</td>
            <td>{{ foo.describe }}</td>
            <td>{{ foo.num }}</td>
            <td>{{ foo.time|date:'Y-m-d H:i:s'}}</td>
            <td>{% for fo in foo.people.all %}
            {% for f1 in fo.lab_set.all %}
                {{ f1.name }}
            {% endfor %}

            {% endfor %}
            </td>
            <td>
                <button id="Asset"  name="{{ foo.id }}" class="ajax btn btn-danger">删除</button>
                <a href="/asset_edit/?id={{ foo.id }}"><button class="btn btn-primary">编辑</button></a>
            </td>


        </tr>
    {% endfor %}

    </tbody>
</table>
          </div>

{% endblock %}
{% block k3 %}
    class="active"
{% endblock %}